import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

/**
 * @author：刘东
 * @created: 2013-5-9 下午02:12:31 
 * @version：$Id$ 
 * @since:1.0
 * @copyright 
 *
 */

public class CompareMap {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Map<String, String> m1 = new HashMap<String, String>();
		Map<String, String> m2 = new HashMap<String, String>();
		m1.put("1", "a");
		m1.put("2", "c");
		m2.put("2", "a");
		m2.put("2", "d");
		Iterator iter_m1 = m1.keySet().iterator();
		Iterator iter_m2 = m2.keySet().iterator();

		while (iter_m1.hasNext()) {
			String m1Str = (String) iter_m1.next();
			while (iter_m2.hasNext()) {
				String m2Str = (String) iter_m2.next();
				if (m1.get(m1Str).equals(m2.get(m2Str))) {
					System.out.println("相等");
				} else {
					System.out.println("不相等");
				}
			}
		}

	}

}
